package com.shazhu.nongjt.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shazhu.common.annotation.Excel;
import com.shazhu.common.core.domain.BaseEntity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;

/**
 * 打印机序列号库对象 njt_printer_serial
 * 
 * @author shazhu
 * @date 2025-09-29
 */
public class NjtPrinterSerial extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序列号ID */
    private Long serialId;

    /** 打印机序列号 */
    @Excel(name = "打印机序列号")
    @NotBlank(message = "打印机序列号不能为空")
    private String serialNumber;

    /** 产品型号 */
    @Excel(name = "产品型号")
    @NotBlank(message = "产品型号不能为空")
    private String productModel;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "生产日期不能为空")
    private Date manufactureDate;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    @Pattern(regexp = "0|1", message = "状态只能为0或1")
    private String status;

    public void setSerialId(Long serialId) 
    {
        this.serialId = serialId;
    }

    public Long getSerialId() 
    {
        return serialId;
    }

    public void setSerialNumber(String serialNumber) 
    {
        this.serialNumber = serialNumber;
    }

    public String getSerialNumber() 
    {
        return serialNumber;
    }

    public void setProductModel(String productModel) 
    {
        this.productModel = productModel;
    }

    public String getProductModel() 
    {
        return productModel;
    }

    public void setManufactureDate(Date manufactureDate) 
    {
        this.manufactureDate = manufactureDate;
    }

    public Date getManufactureDate() 
    {
        return manufactureDate;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("serialId", getSerialId())
            .append("serialNumber", getSerialNumber())
            .append("productModel", getProductModel())
            .append("manufactureDate", getManufactureDate())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}